Infraforage

EKS & ArgoCD - A real prod

Resilient Infra

When I wanted to run my first application on EKS, I debated whether to use CDK or Terraform for instantiation. After comparing these two IaC platforms, I chose Terraform over CDK (CloudFormation). While both tools' differences are available online, my primary driving factor was Terraform's multi-cloud capability.

Fundamentally, Terraform and Cloudformation are compared as below:

1. This is the fundamental difference. CloudFormation is an AWS-managed service and only provisions AWS resources (plus a few approved third-party services via the Registry). Terraform uses a provider model to manage resources across AWS, Azure, GCP, and dozens of other services (Kubernetes, GitHub, etc.).

2. The core concept is correct, but there's a key distinction: Terraform exposes the state file (e.g., in an S3 bucket), giving the user full control over the state. CloudFormation manages the state internally as a managed service, which is represented by the Stack. Terraform's plan is a powerful, human-readable preview, which is the equivalent function to CloudFormation's Change Sets (which are less user-friendly).

3. AWS has launched and heavily promotes the CloudFormation Registry, which acts as a central location. CloudFormation now supports Modules (like Terraform modules) for reusable resource configurations. While Terraform's module ecosystem (Terraform Registry) is generally considered more robust and mature.

4. Terraform is faster than Cloudformation.

5. Terraform does not have an inherent automatic rollback mechanism, which is a plus for Cloudformation.

My suggestion - Both are awesome tools. If you are 'only' using AWS, go with Cloudformation.

Once my EKS is ready, I will deploy ArgoCD, another open source. I will be deploying it using heml.

ArgoCD helps me implement GitOps, which says 'Git is the single source of truth', for my K8S infrastructure and applications deployed.

ArgoCD helped me with below goals:

1. Automatic reconcilliation.
2. PUSH or PULL - Any mechanism can be used for drift detection.
3. Awesome real time visualization, what is getting deployed on my K8S cluster and where.
4. Rollback is easier, just point your ArgoCD to previous Git commit.
5. Argo CD unifies your deployment strategy, enabling seamless GitOps for any application across any number of clusters, regardless of the underlying cloud provider.

In conclusion, this two-stage approach—using Terraform for flexible, multi-cloud infrastructure and Argo CD for automated, Git-driven application deployment—creates a powerful and repeatable delivery pipeline for a modern Kubernetes environment.

Code